This invention relates to sections of a compound document, and is more particularly related to a system and method for storing, viewing, editing, and processing ordered sections having different file formats.
Binding separate paper documents together can create a well organized, coherent collection of information. The separate documents become sections of the bound collection. Binding sections together is the reason traditional three-ring paper binders were created. Multiple sections can be kept in a particular order that makes sense to the one binding the sections together. Different kinds of sections, such as drawings, photographs, and text, can be bound together and labeled with consecutively numbered pages. The bound collection becomes one physical entity that can be maintained and carried around as a single binder. However, the advantages of binding document sections together in the paper world do not easily translate into a computerized environment for electronic documents.
In the electronic documents environment, there are several methods of xe2x80x9cbindingxe2x80x9d electronic document files or sections together. First, document files can be organized or xe2x80x9cboundxe2x80x9d together in a directory. However, the document files are stored separately, not as a single file, making it more cumbersome to copy or to electronically mail the documents files. Additionally, the files within the directory cannot be maintained in a user-definable order nor can the directory itself be transferred (e.g., copied or electronically mailed) as a single file.
Microsoft Corporation""s Word 6.0 word processing application program is capable of binding sections of a compound document in what is called a master document. Sub-documents contain data that is used in the master document. The master document reflects the status of each sub-document that is part of the master document. However, the master document cannot store the sub-documents as part of a single file (master document) nor is the native format for a document maintained once the document is saved as a sub-document of the master document. Furthermore, the master document cannot store sub-documents of differing file formats.
Microsoft Corporation""s Excel 5.0 spreadsheet application program is also capable of binding sections of a compound document in what is called a workbook document. The workbook document contains multiple spreadsheets within a single file in a predetermined order. However, the native format for each spreadsheet is not maintained in the workbook document. Furthermore, the workbook document is not capable of storing sections of differing file formats, i.e., only spreadsheets can be sections of the workbook document.
Sections of a compound document can be stored as sub-files of a single compound document file, also known as a file bundle. The data within each sub-file is maintained in the native format defined by the application program module that generated each sub-file. The compound document file maintains the sub-files and a directory of pointers. The pointers indicate the physical location in memory of each sub-file within the compound document file. However, the order of sub-files is not maintained within the compound document file.
Another method of xe2x80x9cbindingxe2x80x9d electronic documents together is by embedding information from document files into a compound document. This compound document concept is well known and is implemented by the Object Linking and Embedding (OLE) 2.0 protocol and functions designed and marketed by the Microsoft Corporation. In the context of OLE 2.0, a compound document comprises a containing document (container) and an embedded document (embedded object) that is linked and embedded within the containing document.
In general, a containing application is an application program module that maintains a container, such as a compound document. The containing application provides storage for the compound document as well as a place for viewing and editing the embedded object amongst the containing document. A serving application is an application program module that creates an embedded object. The serving application creates an xe2x80x9cobject viewxe2x80x9d of the embedded object and displays the object view amongst the contents of the containing document itself. For example, a compound document could be a newsletter (container) having a chart (embedded object) displayed within the window that displays the newsletter.
According to the OLE 2.0 protocol, when an embedded object is edited, the user must first xe2x80x9cactivatexe2x80x9d the embedded object. This is conventionally accomplished with a double click of the mouse on the displayed embedded object, which renders the embedded object to be xe2x80x9cin place activexe2x80x9d or xe2x80x9cUI activexe2x80x9d. Once activated, the menus of an application program module that created the activated embedded object are negotiated with the containing application under the OLE 2.0 protocol. As a result of the menu negotiations, the user sees a different set of menus that are relevant to the activated embedded object.
When the OLE compound document is stored, structured storage is utilized. Structured storage is a set of application programming interfaces (APIs) for describing a way to create a single file structure that can contain other file structures with the single file, similar to storing directories and additional files within a single directory. An implementation of this kind of structured storage for a compound document is also referred to as Doc Files. Those skilled in the art will be familiar with compound documents and the features and protocol of standard OLE 2.0 including structured storage techniques. Additional details of OLE 2.0 can be obtained by referring to xe2x80x9cInside OLE 2xe2x80x9d by Kraig Brockschmidt, published by Microsoft Press.
Once an OLE embedded object is embedded within the containing document, the OLE embedded object is stored in a format that is native to the application program module that created the embedded object, but is not necessarily the same as the file format for the application. The embedded object becomes tightly associated with the containing document and is stored in a single file along with the containing document. The embedded object can no longer be manipulated outside the confines of the containing document.
When viewing an embedded object, the embedded object is displayed within a single window or viewport along with the containing document. However, each embedded object or section of the OLE compound document cannot be solely viewed and edited within the entire viewport. Embedded objects are limited to being viewed and edited within only a portion of the window or viewport amongst the contents of the containing document.
Problems may arise when printing out an OLE compound document. For OLE compound documents, the containing application prints all sections of the OLE compound document, including the containing document as well as metafile representations of the embedded objects. This results in less than optimum printing control and print quality. For example, the containing application may not recognize the need for a page break when printing the representation of a large embedded spreadsheet or a large embedded graphic image. To resolve this quality problem, one approach is to individually print each section of the compound document by instructing the serving application program to print out each embedded object or section. However, this approach can allow other print jobs to interrupt the process of printing each section of the entire compound document because other print jobs can be processed after each section is printed. This results in confusion at the printer when sections are not consecutively printed as a single, uninterrupted print job and when the sections are not consecutively numbered.
Therefore, in the context of electronic documents, there is a need for xe2x80x9cbindingxe2x80x9d or storing related sections of a compound document in a single file where the sections are of different file formats, maintained in an order, and maintained in a native format. Additionally, there is a need to view and edit ordered sections within a viewport and to consecutively print the ordered sections as an uninterrupted print job with better print quality and control and with consecutive page numbering.
The present invention satisfies the above-described needs by providing a system and method for storing, viewing, editing, and processing ordered sections having differing file formats in a compound document. In one aspect of the present invention, the method stores a compound document having ordered sections of differing file formats. A binder file is initially created for storing the compound document in memory. An index structure is then created within the binder file. The index structure defines the order of sections within the binder file. A first file, which is stored in the binder file, has a first file format native to the program module that created the first file. A second file, which is stored in the binder file, has a second file format native to the program module that created the second file. The order between the first and second section is updated within the index structure in response to storing the first and second sections in the binder file. In this manner, sections of a compound document having differing file formats can be stored in one file structure while advantageously maintaining the order of sections and the native file format of each section.
Additionally, the second section can be removed from the binder file and stored as an external file that advantageously retains the native file format of the second section. Furthermore, the order of sections can be changed by altering the order stored in the index structure without altering the location where the first and second section are stored in memory. This is advantageous because the order of sections can be maintained and updated without inefficient and time-consuming changes of the memory locations for these sections.
In another aspect of the present invention, a method is described for viewing and editing sections having different file formats and stored in memory within a user-definable order. First, a viewport for viewing and editing the contents of each of the sections is displayed. One of the sections is selected for viewing in the viewport. The contents of the selected section are viewed in the viewport without viewing the contents of any of the unselected sections and regardless of where the sections are stored, e.g., within a compound document or as a separate document.
More particularly described, graphical images representing different sections can be displayed in a selection area in the user-definable order. Selection of a section typically involves selecting one of the graphical images, such as an icon or a thumbnail image of the selected section, in the selection area. Selection is preferably implemented with a single user-interface operation, such as a single mouse click, which allows the user to easily activate or view each section. The thumbnail image can be an image derived from either a particular page or from multiple pages of the selected section, thus giving the user an easier way to identify the contents of the selected section.
Additionally, a new section can be added or xe2x80x9cboundxe2x80x9d by selecting a representation of an existing file, such as an icon, and moving or xe2x80x9cdraggingxe2x80x9d the representation over the selection area before releasing or xe2x80x9cdroppingxe2x80x9d the representation onto the selection area. Upon release, the existing file is stored as a new section that maintains the native file format of the existing file. The user-definable order is updated as a result of adding the new section. This process makes it intuitive and easier for a user to add new sections of a binder document. The new sections can be stored either as separate document files while the binder file maintains the order of sections or within the binder file itself.
A portion of an existing file can be added as a new section. The contents of the existing file are displayed in a separate window before selection of a portion of the existing file contents. A representation of this selected portion of the existing file can be moved and released over the selection area to become a new section, as described above.
Additionally, a section can be removed or xe2x80x9cunboundxe2x80x9d by selecting a graphical image representing one of the sections. The selected section is then moved or xe2x80x9cdraggedxe2x80x9d out of the viewport before releasing or xe2x80x9cdroppingxe2x80x9d the graphical image. The dragged section is removed or copied from the binder file and stored as either an external file or a section within another binder document while retaining the native file format of the dragged section. In this manner, the external file can still be loaded, viewed, and edited by the application program module that created the removed or copied section.
In another aspect of the present invention, a system is provided for consecutively printing ordered sections of a compound document as a single, uninterrupted print job where each section has been created by a corresponding program module and has a different file format than other sections. The system has a processing unit (PU), an input device coupled to the PU, such as a keyboard or a mouse, a pixel-based display device coupled to the PU, and a memory storage device coupled to the PU. In this system, the PU is operative to select which of the sections to print. The PU is also operative to sequentially dispatch the corresponding program module that created each of the selected sections in order to consecutively print the selected sections, preferably with consecutive page numbers, as a single uninterrupted print job. In this manner, all printed pages of the selected sections are consecutively printed and confusion is avoided when printing compound documents having sections of differing file formats. By allowing each of the corresponding program modules to print their respective section, the print quality is enhanced.
In yet another aspect of the present invention, a computer-readable medium is described on which is stored a computer program for checking the spelling of text within ordered sections of a compound document. Each section is created by a corresponding program module. The computer program instructions, when executed, select the sections of the compound document in which to check the spelling of text. The corresponding program module that created the highest order section is dispatched to check the spelling of text from the highest order section. The dispatching step is sequentially repeated for the next highest order section until the spelling of text from all the selected sections has been checked. In this manner, the optimized individual spell checking routines from each of the corresponding program modules can be used to check the spelling of differently formatted sections. A similar operation can be performed to check the grammar of text within ordered sections of a compound document.
These and other advantages of the present invention will be appreciated from studying the following detailed description and drawings, and the appended claims.